package com.banban.user.config;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.beans.factory.annotation.Value;

@Configuration
public class OssConfig {
    @Value("${oss.APIKey}")
    private String apiKey ;

    @Value("${oss.APISecret}")
    private String apiSecket;

    @Value("${oss.Endpoint}")
    private String endPoint;

    @Bean
    public OSS AliyunOssClient(){
        return (new OSSClientBuilder()).build(endPoint, apiKey, apiSecket);
    }
}
